import skimage.feature
import skimage.segmentation
import matplotlib.pyplot as plt
from skimage.data import coffee
img = coffee()
for colour_channel in (0, 1, 2):
    img[:, :, colour_channel] = skimage.feature.local_binary_pattern(
        img[:, :, colour_channel], 8,1.0,method='var')
plt.imshow(img);
plt.show()
